import NetWorkTool from "./netWorkTool.js"

/**
 * 添加用户
 * {
	"birthday": "",
	"gender": 0,
	"img": "",
	"password": "",
	"phone": "",
	"realName": "",
	"userName": ""
}
 */
export function addUser(ars) {
	return NetWorkTool.POST('/api/sys-user/addUser', ars,true);
}

/**
 * andUserRole
 *   roleIds, userId
 */
// export function andUserRole(ars) {
// 	return NetWorkTool.POST('api/sys-user/andUserRole', ars,true);
// }

/**
 * 查询用户-角色-部门
 */
export function getUserInfo(ars) {
	return NetWorkTool.GET('/api/sys-user/getUserInfo', ars,false);
}

/**
 * @param {Object} ars用户授权角色接口
 */
export function andUserRole(ars) {
	return NetWorkTool.POST(`/api/sys-user/andUserRole?userId=${ars.userId}`, ars.roleIds,false);
}
/**
 * 获取用户列表信息
 * {
	"current": 1,
	"pageSize": 10,
	"param": ""
}
 */
export function getUserList(ars) {
	return NetWorkTool.POST('/api/sys-user/getUserList', ars,false);
}